home *** CD-ROM | disk | FTP | other *** search
- program Muscle;{draws all three muscle fiber/myofilaments on screen at once}
- {U$-}
- uses {statement to use Mac ToolBox routines}
- MemTypes,QuickDraw,OSIntF,ToolIntf;
-
- var {global variables --- some could be put in procedural variables altho}
- {procedures use most of these variables}
- ArcRect : rect;{could have declared this as Arc --- will do later}
- OvalRect : rect;{could have declared this as Oval --- will do later}
- NumbA : integer;{didn't use this but put it in for future}
- Angle:integer;
- Arc : rect;
- Oval : rect;
- Count : integer;
- myPort:GrafPort;
- r:Rect;
-
-
- Procedure RelaxedMuscle;
-
- begin
- PenSize (3,3);
- MoveTo(85, 24);{move cursor to these coordinates}
- LineTo(350,24);{draw line from 70H to 390H}
- MoveTo(85, 104);{move cursor to these coordinates V 200}
- LineTo(355,104);{draw line from 70H to 390H and 200V}
-
- {--------------------------------}
-
- SetRect(ArcRect,305,25,405,105);{set oval for black arc of A band}
- SetRect(OvalRect,270,27,370,104);{set oval for white blocking of A band}
- PaintOval(ArcRect);{paint black part of A band}
- PenPat(White);{set pen to white}
- PaintOval(OvalRect);{paint blocking white part of A band}
-
- for count := 1 to 2 do {draw A bands}
- begin
- OffSetRect(ArcRect, -90,0);{move rectangle to left by 90}
- OffSetRect(OvalRect, -90,0);
- PenPat (Black);
- PaintOval(ArcRect);
- PenPat (White);
- PaintOval(OvalRect);
- end;
-
- PenPat(black); {Set Z lines}
- PenSize(2,2);
- SetRect(Arc,60,25,160,105);
- FrameArc(Arc,0,180);
- for count := 1 to 2 do
- begin
- OffSetRect(Arc, 95,0);
- FrameArc(Arc,0,180);
- end;
-
- PenPat(Dkgray);
- SetRect(OvalRect, 35,25,135,105);
- PaintOval(OvalRect);
-
- end; {Procedure RelaxedMuscle}
-
- Procedure Myofilaments;
-
- begin
-
- MoveTo(75, 119);{move cursor to these coordinates}
- LineTo(360,119);{draw line from 75H to 360H}
- MoveTo(75, 200);{move cursor to these coordinates V 200}
- LineTo(362,200);{draw line from 75H to 360H and 200V}
-
-
- {Draw Z lines}
-
- PenPat(Black);
- PenSize(2,2);
- SetRect(Arc,90,119,190,200);
- FrameArc(Arc,0,180);
- for count := 1 to 1 do
- begin
- OffSetRect(Arc, 160,0);
- FrameArc(Arc,0,180);
- end;
-
- PenSize(5,5);
- SetRect(Arc,312,119,412,200);
- FrameArc(Arc, 0,180);
- {Draw Thick Filaments} {This might work better if set rectangle to 0}
- {vertical and then use offset rectangle}
- PenSize(3,3);
- MoveTo(190,125);
- LineTo(300,125);
- MoveTo(200,140);
- LineTo(310,140);
- MoveTo(210,155);
- LineTo(320,155);
- MoveTo(200,170);
- LineTo(310,170);
- MoveTo(190,185);
- LineTo(300,185);
- {Draw Thin Filaments}
- PenSize(1,1);
- MoveTo(100,133);
- LineTo(240,133);
-
- MoveTo(110,148);
- LineTo(250,148);
-
- MoveTo(120,163);
- LIneTo(260,163);
-
- MoveTo(110,178);
- LineTo(250,178);
-
- MoveTo(100,193);
- LineTo(240,193);
-
- MoveTo(270,133);
- LineTo(390,133);
-
- MoveTo(280,148);
- LineTo(400,148);
-
- MoveTo(290,163);
- LIneTo(410,163);
-
- MoveTo(280,178);
- LineTo(400,178);
-
- MoveTo(270,193);
- LineTo(390,193);
- PenPat(Dkgray);
- SetRect(Oval, 35,119,135,201);
- PaintOval(Oval);
-
- end; {procedure Myofilaments}
-
- Procedure ContractedMuscle;
-
- begin
-
- PenSize(1,2);
- MoveTo(105, 219);{move cursor to these coordinates}
- LineTo(300,219);{draw line from 70H to 390H}
- MoveTo(105, 300);{move cursor to these coordinates V 200}
- LineTo(300,300);{draw line from 70H to 390H and 200V}
-
- PenPat(black);
- SetRect(ArcRect,250,219,350,302);
- SetRect(OvalRect,215,220,315,300);
- PaintOval(ArcRect);
- PenPat(White);
- PaintOval(OvalRect);
-
- for count := 1 to 2 do
- begin
- OffSetRect(ArcRect, -65,0);
- OffSetRect(OvalRect, -65,0);
- PenPat (Black);
- PaintOval(ArcRect);
- PenPat (White);
- PaintOval(OvalRect);
- end;
-
- PenPat(black); {Set Z lines}
- PenSize(2,2);
- SetRect(Arc,75,220,175,302);
- FrameArc(Arc,0,180);
- for count := 1 to 2 do
- begin
- OffSetRect(Arc,65,0);
- FrameArc(Arc,0,180);
- end;
-
- PenPat(Dkgray);
- SetRect(OvalRect, 60,220,160,301);
- PaintOval(OvalRect);
-
- end; {Procedure ContractedMuscle}
-
- begin {main program of Muscle}
-
- InitGraf(@thePort);{initialization for a graph port}
- OpenPort(@myPort);
- FillRect(myPort.portBits.Bounds,white);{fills screen with white}
- PenPat(black);
- PenSize(4,5);
- SetRect(r,2,2,508,338);{coordinates for top left and bottom right of screen}
- FrameRect(r);{Puts black border around screen ---jazz it up a little}
-
-
- RelaxedMuscle;
- Myofilaments;
- ContractedMuscle;
- Repeat
- until Button;{press mouse button to go back to Finder}
- end. {end program Muscle}